package thirdwork;

/**
 * @author ：chenzikang
 * @date ： 2020/3/10
 */

public class SoftKeyboard {
    public static void main(String[] args) {

        int s = -1;

        int arr[] = new int[10];

        int i = 0;

        while (i < 10) {

            s = (int) (Math.random() * 10 + 1);

            for (int j = 0; j < 10; j++) {

                if (arr[j] == s) {

                    break;

                } else if (j == i) {

                    arr[i] = s;

                    i++;

                    break;

                }

            }

        }
        for (int x:arr
             ) {
            System.out.print(x+",");
        }

    }

}
